#include "cybertron/node/TrafficActor.hpp"

CYBERTRON_BEGIN

CybertronCoreAPI TrafficActor::TrafficActor()
{
	zeroMembers();
}

CybertronCoreAPI TrafficActor::TrafficActor(const TrafficActor& rhs)
{
	mOwnerId = rhs.mOwnerId;
	mRuntimeId = rhs.mRuntimeId;
	mType = rhs.mType;
	mAssetId = rhs.mAssetId;
	mObjectSpaceSize = rhs.mObjectSpaceSize;
	mWorldPosition = rhs.mWorldPosition;
	mWorldRotationEulerXYZ = rhs.mWorldRotationEulerXYZ;
	mFlags = rhs.mFlags;
	mCustomProperties = rhs.mCustomProperties;
}

CybertronCoreAPI TrafficActor::TrafficActor(TrafficActor&& rhs)
{
	mOwnerId = rhs.mOwnerId;
	mRuntimeId = rhs.mRuntimeId;
	mType = rhs.mType;
	mAssetId = rhs.mAssetId;
	mObjectSpaceSize = rhs.mObjectSpaceSize;
	mWorldPosition = rhs.mWorldPosition;
	mWorldRotationEulerXYZ = rhs.mWorldRotationEulerXYZ;
	mFlags = rhs.mFlags;
	mCustomProperties.swap(rhs.mCustomProperties);
}

CybertronCoreAPI TrafficActor& TrafficActor::operator = (const TrafficActor& rhs)
{
	mOwnerId = rhs.mOwnerId;
	mRuntimeId = rhs.mRuntimeId;
	mType = rhs.mType;
	mAssetId = rhs.mAssetId;
	mObjectSpaceSize = rhs.mObjectSpaceSize;
	mWorldPosition = rhs.mWorldPosition;
	mWorldRotationEulerXYZ = rhs.mWorldRotationEulerXYZ;
	mFlags = rhs.mFlags;
	mCustomProperties = rhs.mCustomProperties;

	return *this;
}

CybertronCoreAPI TrafficActor& TrafficActor::operator = (TrafficActor&& rhs)
{
	mOwnerId = rhs.mOwnerId;
	mRuntimeId = rhs.mRuntimeId;
	mType = rhs.mType;
	mAssetId = rhs.mAssetId;
	mObjectSpaceSize = rhs.mObjectSpaceSize;
	mWorldPosition = rhs.mWorldPosition;
	mWorldRotationEulerXYZ = rhs.mWorldRotationEulerXYZ;
	mFlags = rhs.mFlags;
	mCustomProperties.swap(rhs.mCustomProperties);

	return *this;
}

CybertronCoreAPI TrafficActor::~TrafficActor()
{
	clear();
}

CybertronCoreAPI void TrafficActor::zeroMembers()
{
	mOwnerId = -1;
	mRuntimeId = -1;
	mType = HotArea::EActorType_MainVehicle;
	mAssetId = -1;
	mObjectSpaceSize = vec3(0, 0, 0);
	mWorldPosition = vec3(0, 0, 0);
	mWorldRotationEulerXYZ = vec3(0, 0, 0);
	mFlags = 0;
}

CybertronCoreAPI void TrafficActor::clear()
{
	mCustomProperties.clear();

	zeroMembers();
}

CYBERTRON_END
